package org.jeecg.modules.basic.behavior.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.basic.behavior.entity.LwgyBehavior;
import org.jeecg.modules.basic.behavior.mapper.LwgyBehaviorMapper;
import org.jeecg.modules.basic.behavior.service.ILwgyBehaviorService;
import org.jeecg.modules.basic.demo.school.entity.LwgyBaseSchool;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;
import java.util.Map;

/**
 * @Description: 行为管理
 * @Author: jeecg-boot
 * @Date:   2021-03-09
 * @Version: V1.0
 */
@Service
public class LwgyBehaviorServiceImpl extends ServiceImpl<LwgyBehaviorMapper, LwgyBehavior> implements ILwgyBehaviorService {
    @Autowired
    private LwgyBehaviorMapper lwgyBehaviorMapper;

    @Override
    public IPage<LwgyBehavior> queryPageListCustoms(Page<LwgyBehavior> page, QueryWrapper<LwgyBehavior> queryWrapper) {
        queryWrapper.isNotNull("stu.id");
        return page.setRecords(lwgyBehaviorMapper.queryPageListCustoms(page,queryWrapper));
    }

    @Override
    public List<Map<String, Integer>> queryCollegeViolationInfo(List<LwgyBaseSchool> schoolList) {
        return baseMapper.queryCollegeViolationInfo(schoolList);
    }
}
